#ifndef _PrivateTimer_ostick_H_
#define _PrivateTimer_ostick_H_

#include <myCommonDefs.h>
#include <rtconfig.h>
#include <interrupt.h>
#include <board.h>


#define hw_CORE_TIMER_BASE            0x3FFF0000 
#define hw_CORE_PRIVATE_BASE           (hw_CORE_TIMER_BASE + 0x0600)
#define hw_CORE_GLOBAL_TIMER_BASE      (hw_CORE_TIMER_BASE + 0x0200)


#define REG_CORE_PTIMER_LOAD         __REG32(hw_CORE_PRIVATE_BASE + 0x00)
#define REG_CORE_PTIMER_VALUE        __REG32(hw_CORE_PRIVATE_BASE + 0x04)
#define REG_CORE_PTIMER_CTRL         __REG32(hw_CORE_PRIVATE_BASE + 0x08)
#define REG_CORE_PTIMER_INT_STAT     __REG32(hw_CORE_PRIVATE_BASE + 0x0C)

#define PTIMER_IRQ_NUMBER       29

#define PTIMER_IRQ_ENABLE      (1 << 2)
#define PTIMER_AUTORELOAD      (1 << 1)
#define PTIMER_TIMER_ENABLE    (1 << 0)

void corePrivateTimerISR(int vector, void *param);
void corePrivateTimerInit();

#endif